<!DOCTYPE html>
<!--<extend name="Base/base" />-->
<block name='head'>  
    <meta charset="utf-8">
    <link href="/Public/Index/css/new_plan.css" rel="stylesheet" /> 
    <!--文件上传-->
    <script type="text/javascript" src="/Public/Cropper/js/ajaxfileupload.js" ></script>
    <style>
        .layui-form-label{color:#666;}
        .layui-input-block{
            display:inline-block;
        }
    </style>
</block>
<block name="content" > 
    <div class="month-form">
        <form>
            <!--<div class="div_col"><a href="http://www.baidu.com">百度</a></div>-->
            <div class="div_col">
                <div class="div_c_l name"><span> 计划类型</span></div>
                <div class="div_c_r select">
                    <select class="pointer" name="type">
                        <foreach name="types" item="type">
                            <option value="{$type.type_id}">{$type.type_name}</option>
                        </foreach>
                    </select>
                </div>
            </div>
            <div style="clear:both"></div>
            <if condition="$info['child_type'] neq null">
                    <div class="layui-form-item">
                        <label class="layui-form-label">子分类</label>
                        <div class="layui-input-block">
                            <input type="text" autocomplete="off" class="layui-input" value="{$info.child_type|getChildType}" readonly />
                        </div>
                    </div>
                </if>
                <div class="layui-form-item point">
                    <a class="open">
                        <label class="layui-form-label pointer" style="width:200px;text-align: right;padding-right:0;color:#666;font-size: 1.15rem;margin-left: 0.5rem;">展开子分类</label>
                        <img src="/Public/Admin/images/arrow-down.png" style="margin-top: 10px;">
                    </a>
                </div>
                <div class="childCate" style="display:none">
<!--                    <div class="layui-form-item">
                        <label class="layui-form-label">选择子分类</label>
                        <div class="layui-input-block">
                            <select name="child_type" class="layui-input">
                                <option value="0">请选择</option>
                            </select>
                        </div>
                        <input type="hidden" class="getChildType" value="{:U('getChildType')}">
                        <input type='hidden' class="currType" value="{$info.child_type|default=0}">
                    </div>-->
                    <div class="div_col" style="margin-top: 0.5rem;">
                        <div class="div_c_l name"><span> 选择子分类</span></div>
                        <div class="div_c_r select">
                            <select class="pointer" name="child_type">
                                <option value="0">请选择</option>
                            </select>
                        </div>
                        <input type="hidden" class="getChildType" value="{:U('getChildType')}">
                        <input type='hidden' class="currType" value="{$info.child_type|default=0}">
                    </div>
<!--                    <div class="layui-form-item">
                        <label class="layui-form-label">增加子分类</label>
                        <div class="layui-input-block">
                            <input type="text" name="add_type" autocomplete="off" class="layui-input" value="" />
                        </div>
                    </div>-->
                    <div class="div_col mo_plan" style="margin-top: 0.5rem;">
                        <div class="div_c_l"><span>增加子分类</span>
                        </div>
                        <div class="div_c_l">
                            <input type="name"  name="add_type" style="width:80%;"/>
                        </div>
                    </div>
                </div>
            <div class="simple">
                <div class="month mo_plan">
                    <textarea name="cont"  cols="40" rows="2"  placeholder="任务" style="font-size:1.3rem;" ></textarea>
                </div>
                <div class="div_col1 value" style="padding:10px 0;">
                    <div class="div_c_p" style="text-indent:0.5rem;"><span>执行人</span>
                    </div>
                    <p class="textarea"><span></span></p>
                    <div class="div_c_y arrow pointer addUser addUser_5" data-id="5" data-key="executor">&#xe638;</div>
                </div>
                <div style="clear:both"></div>
<!--                <div class="fujian">
                    <i class="iconfont">&#xe88a;</i> 
                    <a href="#"><span class="fj">添加附件</span>
                        <span class="icon_add" id="upload">&#xe638;</span>
                    </a>
                    <div class="line filename-cont">
                    </div>
                </div>-->
                <div class="attach_type">
                    <span>标的物</span>
                    <lable class="input_lable" style="color:#E43127">
                        <i class='input_style radio_bg'><input type="radio" name="s_attach_type" value="4"></i>
                        code
                    </lable>
                    <lable class="input_lable" style="color:#E43127">
                        <i class='input_style radio_bg'><input type="radio" name="s_attach_type" value="3"></i>
                        ppt
                    </lable>
                    <lable class="input_lable" style="color:#EA6900">
                        <i class='input_style radio_bg'><input type="radio" name="s_attach_type" value="2"></i>
                        excel
                    </lable>
                    <lable class="input_lable" style="color:#235AA3">
                        <i class='input_style radio_bg radio_bg_check'><input type="radio" name="s_attach_type" value="1" checked></i>
                        word
                    </lable>
                    <div style="clear:both"></div>
                </div>
                <div class="zhongyao">
                    <span>紧急程度</span>
                    <lable class="input_lable" style="color:#235AA3">
                        <i class='input_style radio_bg radio_bg_check'><input type="radio" name="flag" value="3" checked></i>
                        一般
                    </lable>
                    <lable class="input_lable" style="color:#EA6900">
                        <i class='input_style radio_bg'><input type="radio" name="flag" value="2"></i>
                        重要
                    </lable>
                    <lable class="input_lable" style="color:#E43127">
                        <i class='input_style radio_bg'><input type="radio" name="flag" value="1"></i>
                        紧急
                    </lable>
                    <div style="clear:both"></div>
                </div>

            </div>

            <!--详细计划-->
            <div class="complex" style='display: none'>
                <div class="div_col mo_plan">
                    <div class="div_c_l"><span>计划名称</span>
                    </div>
                    <div class="div_c_l">
                        <input type="name"  name="name" style="width:80%;"/>
                    </div>
                </div>
                <div style="clear:both"></div>
                <div class="div_col1 mo_plan value" style="padding:10px 0;">
                    <div class="div_c_p" style="text-indent:0.5rem;"><span>发布部门</span>
                    </div>
                    <p class="textarea depart"><span></span></p>
                    <div class="div_c_y arrow pointer addDept">&#xe638;</div>
                </div>               
                <div style="clear:both"></div>
                <div class="div_col1 mo_plan value" style="padding:10px 0;">
                    <div class="div_c_p" style="text-indent:0.5rem;"><span>发布人员</span>
                    </div>
                    <p class="textarea"><span></span></p>
                    <div class="div_c_y arrow pointer addUser addUser_1" data-id="1" data-key="to_person_id">&#xe638;</div>
                </div>
                <div style="clear:both"></div>
                <div class="div_col1 mo_plan value" style="padding:10px 0;">
                    <div class="div_c_p" style="text-indent:0.5rem;"><span>参与人</span>
                    </div>
                    <p class="textarea"><span></span></p>
                    <div class="div_c_y arrow pointer addUser addUser_2" data-id="2" data-key="participator">&#xe638;</div>
                </div>
                <div style="clear:both"></div>
                <div class="div_col1 mo_plan value" style="padding:10px 0;">
                    <div class="div_c_p" style="text-indent:0.5rem;"><span>负责人</span>
                    </div>
                    <p class="textarea"><span></span></p>
                    <div class="div_c_y arrow pointer addUser addUser_3" data-id="3" data-key="manager">&#xe638;</div>
                </div>
                <div style="clear:both"></div>
                <div class="div_col1 mo_plan value" style="padding:10px 0;">
                    <div class="div_c_p" style="text-indent:0.5rem;"><span>批注领导</span>
                    </div>
                    <p class="textarea"><span></span></p>
                    <div class="div_c_y arrow pointer addUser addUser_4" data-id="4" data-key="opinion_leader">&#xe638;</div>
                </div>
                <div style="clear:both"></div>
                <div class="se_kk">
                    <span>计划级别</span>
                    <lable class="input_lable">
                        <i class='input_style radio_bg'><input type="radio" name="level" value="1"></i>
                        部门级
                    </lable>
                    <lable class="input_lable">
                        <i class='input_style radio_bg radio_bg_check'><input type="radio" name="level" value="2" checked></i>
                        个人级
                    </lable>
                </div>
                <div style="clear:both"></div>
                <div class="div_col mo_plan">
                    <div class="div_c_l"><span>备注</span>
                    </div>
                    <div class="div_c_l">
                        <input type="name"  name="remark" />
                    </div>
                </div>
                <div style="clear:both"></div>
                <div class="div_col mo_plan">
                    <div class="div_c_l"><span>开始时间</span></div>
                    <div class="div_c_l"  style="width:50%;">
                        <input type="name" id="start" placeholder="双击打开日历" name="begin_date" class="dateTime" />
                    </div>
                    <div class="div_c_r time_rl">&#xe602;</div>
                </div>
                <div style="clear:both"></div>
                <div class="div_col mo_plan">
                    <div class="div_c_l"><span>结束时间</span></div>
                    <div class="div_c_l"  style="width:50%;">
                        <input type="name" id="end" name="end_date" placeholder="双击打开日历" class="dateTime"/>
                    </div>
                    <div class="div_c_r time_rl">&#xe602;</div>
                </div>
                <div style="clear:both"></div>
                <div class="jhnr">
                    <textarea  name="content"  cols="40" rows="2"  placeholder="计划内容" style="font-size:1.3rem;" ></textarea>
                </div>
                <div style="clear:both"></div>
<!--                <div class="fujian">
                    <i class="iconfont">&#xe88a;</i> 
                    <a href="#"><span class="fj">添加附件</span>
                        <span class="icon_add" id="upload">&#xe638;</span>
                    </a>
                    <div class="line filename-cont">
                    </div>
                </div>-->
                <div class="attach_type">
                    <span>标的物</span>
                    <lable class="input_lable" style="color:#E43127">
                        <i class='input_style radio_bg'><input type="radio" name="attach_type" value="4"></i>
                        code
                    </lable>
                    <lable class="input_lable" style="color:#E43127">
                        <i class='input_style radio_bg'><input type="radio" name="attach_type" value="3"></i>
                        ppt
                    </lable>
                    <lable class="input_lable" style="color:#EA6900">
                        <i class='input_style radio_bg'><input type="radio" name="attach_type" value="2"></i>
                        excel
                    </lable>
                    <lable class="input_lable" style="color:#235AA3">
                        <i class='input_style radio_bg radio_bg_check'><input type="radio" name="attach_type" value="1" checked></i>
                        word
                    </lable>
                    <div style="clear:both"></div>
                </div>
            </div>
            <input type="file" id="inputImage" name='imgfile' style="display:none">
            <input type="hidden" id="filename" name="uploads" value="">
            <input type="hidden" id="fileurl" name="uploads_url" value="">
            <input type="hidden" name="url" value="{:U('delFile')}">
        </form>
        <div class="submit_tj">
            <p><input type="button" class="sub_tj pointer btn-submit ajax-post" data-url="{:U('addPlan')}" data-form="" value="提&nbsp;&nbsp; 交" ></p>
            <!--<p><input type="button" class="sub_bc pointer btn-submit ajax-post" data-url="{:U('addPlan',array('type'=>1))}" data-form="" value="保&nbsp;&nbsp; 存" ></p>-->
        </div>
    </div>
    <!--<div class="button">
        <a class="am-btn" onclick="history.go(-1)">返 回</a>
    </div>-->

</block>
<block name="script">
    <script type="text/javascript" src="/Public/Index/js/plan.js"></script>
    <script type="text/javascript">
        $(dateTime());


        $(initAddPlan());
        $(initUpload("{:U(CONTROLLER_NAME.'/upload')}"));

    </script>
</block>
